//将request.js整体导入
import request from './request'

//下单请求
export const PlaceOrder = (data) => request.post('/logisticssend', 

 data,    {headers: {
        isToken: true
    }});
//查看个人订单
export const ViewOrder = (data) => request.get('/viewOrder', data, {
    headers: {
        isToken: true
    }
})
//登录
export const LoginAPI = (data) => request.post('/login', data,{
    headers: {
        isToken: false
    }
})
//注册
export const RegisterAPI = (data) => request.post('/register',  data,{
    headers: {
        isToken: false
    }
})
//查看个人信息
export const PersonInfoAPI =()=>request.get('/personinfo',{
    headers:{
        isToken:true
    }
})
//修改个人信息
export const UpdateInfo=(data)=>request.post("/personinfo",data,{
    headers:{
        isToken:true
    }
})
//退出登录
export const LogOut=(data)=>request.post("/logout",data,{
    headers:{
        isToken:true
    }
})
//查看区域物流
export const ViewLogisticAPI=(data)=>request.post("/viewLogistics",data,{
    headers:{
        isToken:true
    }
})

//查看途径区域
export const ViewMapAPI=(data)=>request.get("/LogisticsMap",data,{
    headers:{
        isToken:true
    }
})
//支付接口
export const PayAPI=(data)=>request.put("/logisticssend",data,{
    headers:{
        isToken:true
    }
})
//修改订单状态接口
export const StateAPI=(data)=>request.put("/logisticsup",data,{
    headers:{
        isToken:true
    }
})

//插入下一站数据
export const NextStationAPI=(data)=>request.get("/nextstation",data,{
    headers:{
        isToken:true
    }
})

//查找所有中转站人员的位置
export const AreaInfoAPI=()=>request.get("/areainfo",{
    headers:{
        isToken:true
    }
})


